import React, { Component }from 'react';
import {createStore} from 'redux';
import './App.css';

class App extends Component {

  counter(state = 0, action) {
    switch (action.type) {
      case 'INCREMENT':
        return state + 1;
      case 'DECREMENT':
        return state - 1;
      default:
        return state
    }
  }

  const store = createStore(counter);

  store.subscribe(() => {
    consle.log('current state', store.getState())
  })

  store.dispatch({type:'INCREMENT'})
  store.dispatch({type:'INCREMENT'})
  store.dispatch({type:'INCREMENT'})




  render() {
    return (
      <div className="App">

      </div>
    );
  }
}

export default App;
